package com.example.my_web.pojo;

import lombok.Data;
import org.springframework.stereotype.Component;

@Component
@Data
public class User {
    Long id;
    private String name;
    private String password;

    @Override
    public boolean equals(Object o) {
        if(o == null) return false;
        if(o instanceof User) {
            User user = (User) o;
            if(user.name.equals(this.name)&&user.password.equals(this.password)) return true;
        }
        return false;
    }

}
